import Layout from "@/views/layout/index.vue";
export default [
  {
    path: "/home",
    name: "home",
    meta: {
      title: "首页",
      icon: "House",
    },
    component: Layout,
    redirect: "/home/index",
    children: [
      {
        path: "index",
        name: "home-index",
        meta: {
          title: "仪表盘",
        },
        component: () => import("@/views/home/index.vue"),
      },
      {
        path: "data",
        meta: {
          title: "设备数据",
        },
        name: "data-view",
        component: () => import("@/views/home/data.vue"),
      },
    ],
  }, 

  {
    path: "/device",
    name: "device",
    component: Layout,
    meta: {
      title: "设备",
      icon: "TakeawayBox",
    },
    redirect: "/device/gateway",
    children: [
      {
        path: "gateway",
        meta: {
          title: "网关",
        },
        name: "gateway",
        component: () => import("@/views/device/gateway.vue"),
      },
      {
        path: "group",
        meta: {
          title: "设备群组",
        },
        name: "group",
        component: () => import("@/views/device/group.vue"),
      },
      {
        path: "list",
        meta: {
          title: "传感器列表",
        },
        name: "list",
        component: () => import("@/views/device/list.vue"),
      },
    ],
  },
  {
    path: "/fee",
    name: "fee",
    super: true,
    component: Layout,
    meta: {
      title: "充值",
      icon: "Coin",
    },
    redirect: "/fee/info",
    children: [
      {
        path: "info",
        meta: {
          title: "充值信息",
        },
        name: "info",
        component: () => import("@/views/fee/info.vue"),
      },
      {
        path: "rechargeList",
        meta: {
          title: "充值记录",
        },
        name: "rechargeList",
        component: () => import("@/views/fee/rechargeList.vue"),
      },
      {
        path: "usageList",
        meta: {
          title: "使用记录",
        },
        name: "usageList",
        component: () => import("@/views/fee/usageList.vue"),
      },
    ],
  },
 
  {
    path: "/measurement",
    name: "measurement",
    component: Layout,
    meta: {
      title: "测量",
      icon: "TrendCharts",
    },
    redirect: "/measurement/list",
    children: [
      {
        path: "list",
        meta: {
          title: "列表",
        },
        name: "measurement-list",
        component: () => import("@/views/measurement/list.vue"),
      }
    ],
  },
  {
    path:'/safe',
    name:'safe',
    component:Layout,
    meta:{
      title:'安全',
      icon:'Key'
    },
    redirect: "/safe/safe",
    children:[
      {
        path:'safe',
        meta:{
          title:'安全设置'
        },
        name:'safe-safe',
        component:()=>import("@/views/safe/safe.vue")
      }
    ]
  },
  {
    path: "/account",
    name: "account",
    component: Layout,
    super: true,
    meta: {
      title: "账号",
      icon: "User",
    },
    redirect: "/account/list",
    children: [
      {
        path: "list",
        meta: {
          title: "账号列表",
        },
        name: "account-list",
        component: () => import("@/views/account/list.vue"),
      },
      {
        path: "add",
        meta: {
          title: "添加账号",
        },
        name: "account-add",
        component: () => import("@/views/account/add.vue"),
      },
    ],
  },
  
  {
    path: "/demo",
    name: "demo",
    component: Layout,
    meta: {
      title: "demo",
      icon: "DArrowLeft",
    },
    redirect: "/demo/demo1",
    children: [
      {
        path: "demo1",
        meta: {
          title: "demo1",
        },
        name: "demo-demo1",
        component: () => import("@/views/demo/demo1.vue"),
      },
      {
        path: "demo2",
        meta: {
          title: "demo2",
        },
        name: "demo-demo2",
        component: () => import("@/views/demo/demo2.vue"),
      },
    ],
  },
];
